package Scuttlebutt;

import java.awt.event.*;
import javax.swing.*;

public class EventTimeEdit extends JMenuItem implements ActionListener 
{
	Scuttlebutt parent = null;
	Tab tab = null;
	public EventTimeEdit(String text, Scuttlebutt parent)
	{
		super(text);
		this.parent = parent;
		addActionListener(this);
	}
	
	public EventTimeEdit(String text, Tab tab)
	{
		super(text);
		this.tab = tab;
		addActionListener(this);
	}
	
	
	public void actionPerformed(ActionEvent a0)
	{
		if(parent != null)
			tab = (Tab)((JScrollPane)parent.getEditPane().getSelectedComponent()).getViewport().getView();

		if(tab != null)
			tab.InsertTime();
	}
}

